package com.crm.app.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.app.mapper.UserCallJourMapper;
import com.crm.app.domain.UserCallJour;
import com.crm.app.service.IUserCallJourService;

/**
 * 用户呼叫流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-10
 */
@Service
public class UserCallJourServiceImpl implements IUserCallJourService 
{
    @Autowired
    private UserCallJourMapper userCallJourMapper;

    /**
     * 查询用户呼叫流水
     * 
     * @param id 用户呼叫流水主键
     * @return 用户呼叫流水
     */
    @Override
    public UserCallJour selectUserCallJourById(Long id)
    {
        return userCallJourMapper.selectUserCallJourById(id);
    }

    /**
     * 查询用户呼叫流水列表
     * 
     * @param userCallJour 用户呼叫流水
     * @return 用户呼叫流水
     */
    @Override
    public List<UserCallJour> selectUserCallJourList(UserCallJour userCallJour)
    {
        return userCallJourMapper.selectUserCallJourList(userCallJour);
    }

    /**
     * 新增用户呼叫流水
     * 
     * @param userCallJour 用户呼叫流水
     * @return 结果
     */
    @Override
    public int insertUserCallJour(UserCallJour userCallJour)
    {
        userCallJour.setCreateTime(DateUtils.getNowDate());
        return userCallJourMapper.insertUserCallJour(userCallJour);
    }

    /**
     * 修改用户呼叫流水
     * 
     * @param userCallJour 用户呼叫流水
     * @return 结果
     */
    @Override
    public int updateUserCallJour(UserCallJour userCallJour)
    {
        return userCallJourMapper.updateUserCallJour(userCallJour);
    }

    /**
     * 批量删除用户呼叫流水
     * 
     * @param ids 需要删除的用户呼叫流水主键
     * @return 结果
     */
    @Override
    public int deleteUserCallJourByIds(Long[] ids)
    {
        return userCallJourMapper.deleteUserCallJourByIds(ids);
    }

    /**
     * 删除用户呼叫流水信息
     * 
     * @param id 用户呼叫流水主键
     * @return 结果
     */
    @Override
    public int deleteUserCallJourById(Long id)
    {
        return userCallJourMapper.deleteUserCallJourById(id);
    }
}
